from bilibili_api import user, sync, Credential


CREDENTIAL = Credential(
    sessdata="09138f12%2C1694424935%2Cc25c3%2A31",
    bili_jct="45701673810d9ae929e8b538e6310dc2"
)  # 当前cookie
u = user.User(7349,credential=CREDENTIAL)  # 用户UID
# 获取UID
uid = u.get_uid()
fav_info = sync(u.get_up_stat())
#获取up动态
dynamic = sync(u.get_dynamics(need_top=True))
# 获取粉丝数
follower = sync(u.get_relation_info())["follower"]




# 获取up信息
# user_info_dict = {}
# user_info = sync(u.get_user_info())
# user_info_dict["UP名字"] = user_info['name']
# user_info_dict["UP性别"] = user_info['sex']
# user_info_dict["UP签名"] = user_info['sign']
# user_info_dict["UP生日"] = user_info['birthday']
# print(user_info_dict)
# 获取Up关注的tag
# print(sync(u.get_user_fav_tag()))
# 获取UP的关注，粉丝，黑名单，悄悄关注
# relation_info_dict = {}
# relation_info = sync(u.get_relation_info())
# relation_info_dict["UP关注多少人"] = relation_info['following']
# relation_info_dict["UP悄悄关注"] = relation_info['whisper']
# relation_info_dict["UP黑名单"] = relation_info['black']
# relation_info_dict["UP关注数"] = relation_info['follower']
# print(relation_info_dict)
# 获取Up总播放量，点赞数，阅读数